f860b80adf61574d789fe045cfa69325f2e26be4,modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java,IgniteClientAffinityAssignmentSelfTest,checkAffinityFunction,#,90
Before Change
startGrid(4);
checkAffinity();
cache = false;
After Change
startGrids(3);
long topVer = 3;
try {
checkAffinity(topVer++);
cache = false;
final Ignite ignite3 = startGrid(3);
GridTestUtils.assertThrows(log, new Callable<Object>() {
@Override public Object call() throws Exception {
((IgniteKernal)ignite3).getCache(null);
return null;
}
}, IllegalArgumentException.class, null);
assertNotNull(ignite3.cache(null)); // Start client cache.
((IgniteKernal)ignite3).getCache(null);
checkAffinity(topVer++);
final Ignite ignite4 = startGrid(4);
GridTestUtils.assertThrows(log, new Callable<Object>() {
@Override public Object call() throws Exception {
((IgniteKernal)ignite4).getCache(null);
return null;
}
}, IllegalArgumentException.class, null);
assertNotNull(ignite4.cache(null)); // Start client cache.
((IgniteKernal)ignite4).getCache(null);
checkAffinity(topVer++);
final Ignite ignite5 = startGrid(5); // Node without cache.
GridTestUtils.assertThrows(log, new Callable<Object>() {
@Override public Object call() throws Exception {
((IgniteKernal)ignite5).getCache(null);
return null;
}
}, IllegalArgumentException.class, null);
checkAffinity(topVer++);
stopGrid(5);
checkAffinity(topVer++);
stopGrid(4);